package cn.zn.framework.printer.enums;

import lombok.Getter;

@Getter
public enum PrinterTypeEnum {
    TYPE_0001("0001", "芯烨"),
    ;

    private String code;
    private String name;

    PrinterTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static PrinterTypeEnum findByCode(String code) {
        for (PrinterTypeEnum e : values()) {
            if (e.getCode().equalsIgnoreCase(code)) {
                return e;
            }
        }
        return null;
    }
}
